package com.yourcompany.api.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yourcompany.common.utils.CustomLongSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "权限VO")
public class PermissionVO {

    @JsonSerialize(using = CustomLongSerializer.class)
    @Schema(description = "权限ID")
    private Long id;

    @JsonSerialize(using = CustomLongSerializer.class)
    @Schema(description = "父级权限ID")
    private Long parentId;

    @Schema(description = "权限名称")
    private String name;

    @Schema(description = "权限标识")
    private String code;

    @Schema(description = "权限类型：0-目录 1-菜单 2-按钮")
    private Integer type;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "路由路径")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "权限表达式")
    private String permission;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "状态：0-禁用 1-启用")
    private Boolean status;

    @Schema(description = "是否外链")
    private Boolean isExternal;

    @Schema(description = "是否缓存")
    private Boolean isCache;

    @Schema(description = "是否显示")
    private Boolean isVisible;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "子权限")
    private List<PermissionVO> children;
} 